﻿


CREATE PROCEDURE [dbo].[proc_Employee_Wage_GeRen]
	(
		@UserName nvarchar (50)
	)

AS
		Select 
				Id,
				UserName,
				EName,
				CompanyId,
				(select CompanyName from Company where id=Employee_Wage.CompanyId) as CompanyName,
				(isnull(Employee_Wage.DepartmentId,0)) as DepartmentId,
				(isnull((select DName from Department where id=Employee_Wage.DepartmentId),'''')) as DepartmentName,
				isnull(ZhiWu,'') ZhiWu,
				GradeId,
				(isnull((select Title from Grade where id=Employee_Wage.GradeId),'''')) as GradeName,
				PostCategoryId,
				(isnull((select title from post_category where id=Employee_Wage.PostCategoryId),'''')) as PostCategoryName,
				PostId,
				(isnull((select PostName from Post where id=Employee_Wage.PostId),'''')) as PostName,
				BasicWage,
				PostWage,
				WorkWage,
				JxWage,
				ManQin,	
				Allowance,
				FixedAllowance as FAllowance,
				QtAllowance,
				TiCheng,
				MTiCheng,
				YjBonus,
				LsBonus,
				bxKouKuan,
				YjKouKuan,
				ChuQinKouKuan,
				ChiDaoKouKuan,
				OtherKouKuan,
				FaFangMonth,
				CreateName,
				CreateDate
			From
				Employee_Wage
				Where
					UserName = @UserName

	RETURN



